<template>
	<view>
		<view class="cu-list menu bg-white padding-top" style="margin-top:0;border: 1rpx solid #F5F5F5;" v-for="(item,index) in commentList" :key="index" @tap="goCommentDetail(item)">
			<view class="cu-item">
				<view class="cu-avatar round lg margin-right-sm" :style="'background-image:url('+item.member_face+');'">
				</view>
				<view class="content">
					<view class="text-grey" style="height: 40rpx;">
						<view class="text-cut">{{item.member_name}}</view>
						<image src="../../static/images/icon_level3.png" style="width: 35rpx;height: 60rpx;" mode="aspectFit"></image>
					</view>
					<text class="text-gray text-sm flex">
						{{item.create_time | unixToDate}} {{item.comment_id}}
					</text>
				</view>
			</view>
			<view class="bg-white padding  padding-top-sm padding-bottom-sm" style="line-height: 40rpx;">
				<view class="text-df title_line_2"> {{item.content}}</view>
			</view>
			<view class="bg-white padding-left padding-right">
				<view class="grid col-4 grid-square">
					<view class="bg-img" v-for="(item1,index1) in item.images" :key="index1" :style="[{ backgroundImage:'url(' + item1 + ')' }]"></view>
				</view>
			</view>
			<view class="bg-white margin-top-sm padding" style="padding-top:0">
				<view class="flex align-center justify-between">
					<view class="text-sm text-cut"> 浏览{{item.view_count}}次</view>
					<view class="flex align-center">
					    <!-- <view class="flex align-center margin-right-sm">
					        <image src="../../static/images/icon_prise_cur.png" class="commment-icon" mode=""></image>
					        <text class="text-sm text-cut">{{item.thumb_up || 0}}</text>
					    </view>
					    <view class="flex align-center">
					        <image src="../../static/images/icon_comment.png" class="commment-icon" mode=""></image>
					        <text class="text-sm text-cut">{{item.reply.length || 0}}</text>
					    </view> -->
					</view>                    
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			commentList:{
				type:Array,
				default:[]
			}
		},
		data() {
			return {
				avatar:['https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg','https://ossweb-img.qq.com/images/lol/web201310/skin/big81005.jpg','https://ossweb-img.qq.com/images/lol/web201310/skin/big25002.jpg','https://ossweb-img.qq.com/images/lol/web201310/skin/big99008.jpg'],
			};
		},
		methods:{
			goCommentDetail(item){
				uni.navigateTo({
					url:'/pages/goods/comment/detail?goods_id='+item.goods_id+'&comment_id='+item.comment_id
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	/deep/.cu-list.menu-avatar>.cu-item:after, .cu-list.menu>.cu-item:after {
		border-bottom: 0;
	}
</style>
